package com.stedu.service.impl;

import com.stedu.bean.Account;
import com.stedu.mapper.AccountMapper;
import com.stedu.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class AccountServiceImpl implements AccountService {
    @Autowired
    private AccountMapper accountMapper;
    @Override
    public Account selectByAid(Integer aid) {
        return accountMapper.selectByAid(aid);
    }

    @Override
    public Account selectById(Integer id) {
        return accountMapper.selectById(id);
    }

    @Override
    public Account selectUsername(String username) {
        return accountMapper.selectUsername(username);
    }

    @Override
    public List<Map<String, Object>> selectTop5CnameAndCount() {
        return accountMapper.selectTop5CnameAndCount();
    }

    @Override
    public List<Map<String, Object>> selectCnameAndCount() {
        return accountMapper.selectCnameAndCount();
    }
}
